
package com.wty.love.database.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.io.Serializable;

@Entity(tableName = "Diary")
public class Diary implements Serializable {
    public Diary(){}

    public Diary(String createTime, String weather, String title, String content, String note, String state) {
        this.createTime = createTime;
        this.weather = weather;
        this.title = title;
        this.content = content;
        this.note = note;
        this.state = state;
    }

    @PrimaryKey(autoGenerate = true)
    private int id;
    //创建时间
    @ColumnInfo(name = "createTime")
    private String createTime;
    //天气
    @ColumnInfo(name = "weather")
    private String weather;
    //标题
    @ColumnInfo(name = "title")
    private String title;
    //内容
    @ColumnInfo(name = "content")
    private String content;
    //备注
    @ColumnInfo(name = "note")
    private String note;
    //状态 0 正常 1 放入回收站 2删除
    @ColumnInfo(name = "state")
    private String state;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getWeather() {
        return weather;
    }

    public void setWeather(String weather) {
        this.weather = weather;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "Diary{" +
                "id=" + id +
                ", createTime='" + createTime + '\'' +
                ", weather='" + weather + '\'' +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", note='" + note + '\'' +
                ", state='" + state + '\'' +
                '}';
    }
}
